package com.zb_study.Homework03;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.*;

@SuppressWarnings({"all"})
public class homework03 {
    public static void main(String[] args) {

        Map hashMap = new HashMap();
        hashMap.put("jack", 650);
        hashMap.put("tom", 1200);
        hashMap.put("smith", 2900);
        System.out.println(hashMap);

        hashMap.put("jack", 2600);
        System.out.println(hashMap);

        Set set = hashMap.keySet();
        for (Object key : set) {
            hashMap.put(key, (Integer) hashMap.get(key) + 100);
        }
        System.out.println(hashMap);

        Set entrySet = hashMap.entrySet();
        Iterator iterator = entrySet.iterator();
        while (iterator.hasNext()) {
            Map.Entry next = (Map.Entry) iterator.next();
            System.out.println(next.getKey() + "-" + next.getValue());

            Collection values = hashMap.values();
            for (Object o :values) {
                System.out.println(o);
            }


        }


    }
}
